<template>
  <div>
    <el-row :gutter="20">
      <el-col :span="6" v-for="(item, i) in datalist" :key="item.id">
        <div class="grid-content bg-purple">
          <i class="iconfont" :class="item.icon" :style="{ color: arr[i] }"></i>
          <div>
            <h3>{{ item.text }}</h3>
            <p>{{ item.num }}</p>
          </div>
        </div></el-col
      >
    </el-row>
  </div>
</template>

<script>
export default {
  props: {
    datalist: {
      type: Array,
      default: () => []
    },
    arr: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="less" scoped>
.el-col {
  border-radius: 4px;
}

.bg-purple {
  background: #fff;
}

.grid-content {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  border-radius: 6px;
  height: 80px;
  i {
    font-size: 34px;
  }
  h3 {
    font-size: 22px;
    font-weight: normal;
    color: #ccc;
  }
  p {
    font-size: 16px;
    font-weight: bold;
  }
}
</style>
